﻿/*
 * 由SharpDevelop创建。
 * 用户： xieen
 * 日期: 2013-08-15
 * 时间: 16:03
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;

namespace GoF23Learning._05.Protype_Pattern
{
	/// <summary>
	/// Description of GameSystem.
	/// </summary>
	public class GameSystem
	{
		public void Run()
		{			
			Door door1 = new Door();
			Door door2 = new Door();
	
			Engine engine1 = new Engine();
			Engine engine2 = new Engine();
			
			
			Frame frame1 = new Frame();
			Frame frame2 = new Frame();
			
			
			Wheel wheel1 = new Wheel();
			Wheel wheel2 = new Wheel();
		}
		
		public  void Run1()
		{
			AbstractDoor door1 = new Door();
			AbstractDoor door2 = new Door();
	
			AbstractEngine engine1 = new Engine();
			AbstractEngine engine2 = new Engine();
			
			
			AbstractFrame frame1 = new Frame();
			AbstractFrame frame2 = new Frame();
			
			
			AbstractWheel wheel1 = new Wheel();
			AbstractWheel wheel2 = new Wheel();
		}
		
		public void Run2(AbstractDoor door,AbstractEngine engine,AbstractFrame frame ,AbstractWheel wheel)
		{
			AbstractDoor door1 = door.Clone();
			AbstractDoor door2 = door.Clone();
	
			AbstractEngine engine1 = engine.Clone();
			AbstractEngine engine2 = engine.Clone();
			
			
			AbstractFrame frame1 =frame.Clone();
			AbstractFrame frame2 =frame.Clone();
			
			
			AbstractWheel wheel1 = wheel.Clone();
			AbstractWheel wheel2 = wheel.Clone();
		}
	}
}
